﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace chesslibrary.cs
{
    public class cell_chess
    {
        private int row;
		private int col;
		public cell_chess(int row,int col)
		{
			this.row=row;
			this.col=col;	
		}
        public cell_chess(cell_chess cell)
		{
			row=cell.Row;
			col=cell.Col;	
		}
        public int Row
		{
			get{return row;}
		}
		public int Col
		{
			get{return col;}
		}
        public bool IsDark
		{
			get{return ((row+col)%2==0);}
		}
        public override bool Equals(object o)
		{
			if (o is cell_chess)
			{
				cell_chess c=(cell_chess)o;
				return (c.row==row && c.col==col);			   
			}
			return false;
		}
        public override int GetHashCode()
		{
			return base.GetHashCode();
		}
    }
}
